import request from '@/utils/request'

// 创建数据类型信息
export function createDataCategory(data) {
  return request({
    url: '/idata/data-category/create',
    method: 'post',
    data: data
  })
}

// 更新数据类型信息
export function updateDataCategory(data) {
  return request({
    url: '/idata/data-category/update',
    method: 'put',
    data: data
  })
}

// 删除数据类型信息
export function deleteDataCategory(id) {
  return request({
    url: '/idata/data-category/delete?id=' + id,
    method: 'delete'
  })
}

// 获得数据类型信息
export function getDataCategory(id) {
  return request({
    url: '/idata/data-category/get?id=' + id,
    method: 'get'
  })
}

// 获得数据类型信息分页
export function getDataCategoryPage(query) {
  return request({
    url: '/idata/data-category/page',
    method: 'get',
    params: query
  })
}

// 导出数据类型信息 Excel
export function exportDataCategoryExcel(query) {
  return request({
    url: '/idata/data-category/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
